<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>

<script language="javascript">
function validate(form)		{
	if(form.name.value == "")		{
		alert("user name is blank");
		form.user_name.focus();
	}
	else	{
		form.submit();
	}	
}
</script>

</head>
<body>
	<form action="../main" method="post">
		<input type="text" name="name"><br>
		Hobby:<br>
			<input type="radio" name="hobby" value = "swimming">swimming<br>
			<input type="radio" name="hobby" value="jogging">jogging<br>
			
		Checkbox:<br>
			<input type="checkbox" name="cb" value="cb01">cb01<br>
			<input type="checkbox" name="cb" value="cb02">cb02<br>
			
		<input type="button" value="submit" onClick="validate(this.form)">
	</form>
</body>
</html>